package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class SingleColumnAssignment implements SetClause {

    private int beginIndex;
    private int endIndex;
    private SetTarget setTarget;
    private UpdateSource updateSource;

    public SingleColumnAssignment(SetTarget setTarget, UpdateSource updateSource) {
        this.beginIndex = setTarget.getBeginIndex();
        this.endIndex = updateSource.getEndIndex();
        this.setTarget = setTarget;
        this.updateSource = updateSource;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SetTarget getSetTarget() {
        return setTarget;
    }

    public UpdateSource getUpdateSource() {
        return updateSource;
    }

}
